<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>客户充值</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link rel="stylesheet" href="/js/bootstrap-table/bootstrap-table-1.18.3.min.css">
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>

    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>

    <link rel="stylesheet" href="/css/skin.css"/>
    <style>
        .bootstrap-table .fixed-table-container .fixed-table-body{
            overflow-y: scroll;
        }
    </style>

</head>
<body>
<div class="container-fluid p-t-15">
    <div class="col-sm-12">
        <div class="card">
            <div class="card-header">
                <h1>余额管理</h1>
            </div>
            <div class="card-body">
                <div class="row">
                    <div class="col-lg-9 col-md-6 col-sm-12 col-xs-12">
                        <div class="well form-well" style="height: 500px">
                            <h3>余额查询
                                <div class="row content-action pull-right" style="max-width: none;display: inline-block">
                                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                        <div class="pull-right">
                                            <div class="min-search pull-left">
                                                <input class="form-control" type="text" placeholder="请输入客户名称"
                                                       id="balanceCustomerName" name="balanceCustomerName">
                                                <button class="btn btn-primary" type="button" onclick="balanceTableInit()">
                                                    <i class="mdi mdi-magnify"></i><span>搜索</span>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </h3>

                            <table id="balanceTable"></table>
                        </div>
                    </div>
                    <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12" style="position: relative">
                        <div class="well form-well" style="height: 500px">
                            <h3>新增充值</h3>
                            <input type="hidden" id="cpFollowPlanIdHide">
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin: 4% 15% 0 0%">
                                <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12 col-pad" style="margin-bottom: 0;padding: 0">
                                    <label for="customerInput" class="control-label label-required"  style="padding-left: 0">客户名称</label>
                                    <div class="form-content peers-display">
                                        <select id="customerInput" name="customerInput" class="form-control selectpicker" data-live-search="true" data-size="10">
                                            <option value="1">数据加载中，请稍后</option>
                                        </select>
                                    </div>
                                </div>

                            </div>
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin: 0 15% 2% 0%">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 0">
                                    <label class="control-label label-required" style="padding-left: 0">充值金额</label>
                                    <div class="form-content">
                                        <input id="payMoney" type="text" class="form-control" placeholder="请输入充值金额" autocomplete="off"
                                               maxlength="8" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                                    </div>
                                </div>
                            </div>

<!--                            <div class="clearfix hidden-xs"></div>-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="position: absolute;bottom: 10%;right: 31%">
                                <div class="text-right" >
                                    <button class="btn btn-primary" type="button" onclick="addPay()">
                                        <span>提交</span></button>
                                    <button class="btn btn-default" onclick="clearAllData(1)">取消</button>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <div class="well form-well" style="height: 550px">
                            <h3>客户充值</h3>
                            <div class="row content-action" style="max-width: none;">
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                    <!-- 全部 本周 本月 本年 -->
                                    <div class="time-search pull-left">
                                        <input type="hidden" id="dateType" name="dateType"/>
                                        <div class="all active-second" onclick="selectTime('all')">全部</div>
                                        <div class="today"  onclick="selectTime('today')">今天</div>
                                        <div class="week"  onclick="selectTime('week')">本周</div>
                                        <div class="month" onclick="selectTime('month')">本月</div>
                                        <div class="year" onclick="selectTime('year')">本年</div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-5 col-sm-5 col-xs-12">
                                    <div class="pull-right">
                                        <div class="min-search pull-left">
                                            <input class="form-control" type="text" placeholder="请输入客户名称"
                                                   id="customerName" name="customerName">
                                            <button class="btn btn-primary" type="button" onclick="searchOrderList()">
                                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                                            </button>
                                        </div>
<!--                                        <button class="btn btn-default" data-toggle="modal"-->
<!--                                                data-target="#addPay" >-->
<!--                                            <i class="mdi mdi-sort-variant"></i>新增充值-->
<!--                                        </button>-->
                                    </div>
                                </div>
                            </div>
                            <table id="customerPayFrom"></table>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>


<!--
 新增充值 弹窗
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="addPay"  aria-labelledby="addPayLabel" aria-hidden="true">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>客户充值</h4>
            </div>
            <input type="hidden" id="cpFollowPlanIdHide">
            <div class="row"  style="padding: 30px">
                <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad">
                    <label for="customerInput" class="control-label label-required">客户名称</label>
                    <div class="form-content peers-display">
                        <select id="customerInput" name="customerInput" class="form-control selectpicker" data-live-search="true" data-size="10">
                            <option value="1">数据加载中，请稍后</option>
                        </select>
                    </div>
                </div>
                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <label class="control-label label-required" >充值金额</label>
                    <div class="form-content">
                        <input id="payMoney" type="text" class="form-control" placeholder="请输入充值金额" autocomplete="off"
                               maxlength="8" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                    </div>
                </div>
                <div class="clearfix hidden-xs"></div>
                                <div class="form-group col-lg-2 col-md-4 col-sm-6 col-xs-12">
                <div class="text-right">
                    <button class="btn btn-primary" type="button" onclick="addPay()">
                        <span>提交</span></button>
                    <button class="btn btn-default" onclick="clearAllData(1)">取消</button>
                </div>
                &lt;!&ndash;                </div>&ndash;&gt;
            </div>
        </div>
    </div>
</div>
-->

<!-- 修改充值 弹窗 -->
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="updatePay">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>修改充值信息</h4>
            </div>
            <input type="hidden" id="customerPayIdHide">
            <div class="row"  style="padding: 30px">
                <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad">
                    <label for="customerInput2" class="control-label label-required">客户名称</label>
                    <div class="form-content peers-display">
                        <select id="customerInput2" name="customerInput2" class="form-control selectpicker" data-live-search="true" data-size="10" >
                            <option value="1">数据加载中，请稍后</option>
                        </select>
                    </div>
                </div>
                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <label class="control-label label-required" >充值金额</label>
                    <div class="form-content">
                        <input id="payMoney2" type="text" class="form-control" placeholder="请输入充值金额" autocomplete="off"
                               maxlength="8" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                    </div>
                </div>
                <div class="clearfix hidden-xs"></div>
                <!--                <div class="form-group col-lg-2 col-md-4 col-sm-6 col-xs-12">-->
                <!--                    <label>&nbsp;</label>-->
                <div class="text-right">
                    <button class="btn btn-primary" type="button" onclick="subUpdateCustomerPay()">
                        <span>提交</span></button>
                    <button class="btn btn-default" onclick="clearAllData(2)">取消</button>
                </div>
                <!--                </div>-->
            </div>
        </div>
    </div>
</div>

<!-- 充值记录 弹窗 -->
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="rechargeRecord">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>充值记录</h4>
            </div>
            <div class="modal-body">
                <table id="rechargeRecordTable"></table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary link-sure" data-dismiss="modal">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<!-- 消费记录 弹窗 -->
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="expensesRecord">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>消费记录</h4>
            </div>
            <div class="modal-body">
                <table id="expensesRecordTable"></table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary link-sure" data-dismiss="modal">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<!-- 申请退款 弹窗 -->
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="requestRefund" data-keyboard="false"  aria-labelledby="requestRefund" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>申请退款</h4>
            </div>
            <div class="modal-body">
                <input type="hidden" id="customId">
                <div class="row">
                    <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <label for="customerInput2" class="control-label">当前客户: <span id="currentCustomer"></span></label>
                    </div>
                    <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <label class="control-label" >当前可退款金额: <span id="currentRefundMoney"></span></label>
                    </div>
                    <div class="form-group col-lg-8 col-md-5 col-sm-12 col-xs-12">
                        <label class="control-label label-required" >请输入退款金额</label>
                        <div class="form-content" style="display: inline-block">
                            <input id="refundMoney" type="text" class="form-control" placeholder="请输入退款金额" autocomplete="off"
                                   maxlength="8" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                    </div>
                    <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <label class="control-label" >备注：</label>
                        <div class="form-content" >
                            <textarea id="refundMake" type="text" class="form-control" style="height: 100px" maxlength="100"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary link-sure" onclick="submit()">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">重置</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<!--<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>-->
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min-1.18.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<script src="/js/crm/common/city.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns-1.18.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-multitabs/multitabs.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>

<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<script src="/js/verSelect.2.0.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/customerManager/user/customerPayForm.js"></script>
</html>